package dk.aiszone.lang.autosource.generatorobjects.interfaces;

import java.util.List;

import dk.aiszone.lang.autosource.generatorobjects.Annotation;
import dk.aiszone.lang.autosource.generatorobjects.Declaration;

/**
 * Interface implemented by java objects which can be declared.
 * 
 * @author ads
 */
public interface DeclarableObject {

    /**
     * Add an <code>Annotation</code> to the <code>DeclarableObject</code>
     * 
     * @param annotation
     *            The <code>Annotation</code> to add.
     */
    public void addAnnotation(Annotation annotation);

    /**
     * Retrieve a <code>List</code> of <code>Annotations</code> declared on the <code>DeclarableObject</code>.
     * 
     * @return <code>List</code> of <code>Annotations</code>.
     */
    public List<Annotation> getAnnotations();

    /**
     * Retrieve the <code>Declaration</code> of the <code>DeclarableObject</code>.
     * 
     * @return The variable declaration - or <code>null</code> if unset.
     */
    public abstract Declaration getDeclaration();

    /**
     * Retrieve the name of the <code>DeclarableObject</code>
     * 
     * @return The method name - or <code>null</code> if unset.
     */
    public abstract String getName();

    /**
     * Set the <code>Declaration</code> of the <code>DeclarableObject</code>.
     * 
     * @param declaration
     *            The method declaration - or <code>null</code> to unset.
     */
    public abstract void setDeclaration(Declaration declaration);

    /**
     * Set the name of the <code>DeclarableObject</code>
     * 
     * @param name
     *            The method name - or <code>null</code> to unset.
     */
    public abstract void setName(String name);
}